#ifndef __EKF_CONTEXT_I_H__
#define __EKF_CONTEXT_I_H__

struct context_s
{
	 uint32_t stk_ptr;
	 uint32_t stk_top;

	 uintptr_t pc;
	 
	 int        lcpu;
	 physaddr_t vpt;
	 
	 struct trapframe_s *tf;
};

void context_switch(struct context_s *from, struct context_s *to);
void context_fill(struct context_s *ctx,
				  void (*entry)(void *arg), void *arg,
				  physaddr_t vpt, uintptr_t stk_top);

extern uint32_t initial_ctx_stacks[LAPIC_COUNT];

int context_init(void);

#endif
